local wdtx__fanSkill = fk.CreateSkill {
  name = "#wdtx__fan_skill",
  attached_equip = "wdtx__fan",
}

wdtx__fanSkill:addEffect(fk.AfterCardUseDeclared, {
  can_trigger = function(self, _, target, player, data)
    return target == player and player:hasSkill(wdtx__fanSkill.name) and (data.card.name == "slash" or data.card.name == "wdtx__slash")
  end,
  on_use = function(self, _, target, player, data)
    local room = player.room
    local equipid = player:getEquipment(Card.SubtypeWeapon)
    if not equipid then return end
    local ecard = Fk:getCardById(equipid)
    if ecard and ecard:getMark("@up_fire") > 0 then
      local tars = data.tos
      for _,pid in ipairs(tars) do
        local tar = pid
        room:addPlayerMark(tar,"@up_fire",2)
        if not tar:hasSkill("burningSkill") then
          room:handleAddLoseSkills(tar,"burningSkill",nil,false)
        end
      end
    end
    data:changeCard("fire__slash", data.card.suit, data.card.number, self.name)
  end,
})


return wdtx__fanSkill